<?php
require_once("../includes/config.php");
if(isset($_GET['page']) && !empty($_GET['page']))
	{
	$page =filter_var($_GET['page'], FILTER_SANITIZE_NUMBER_INT);
	$start = $page*20 - 20;
	}
	else
	{
	$start = 0;
	$page = 1;
	}
	$cos=query('SELECT * FROM companies WHERE owner_id = ?',$_SESSION["user_id"]);
	if (isset($_GET['count'])&&$_GET['count']!=""&&is_numeric($_GET['count']))
	{
	$totalPages=$_GET['count'];
	}
	else
	{
	$Count=query('SELECT COUNT(*) FROM companies WHERE owner_id = ?',$_SESSION["user_id"]);
	$totalPages = $Count[0]['COUNT(*)'];
	}
render("settings/coprice.php", array("title"=>"اعدادات اسعار الشركات","totalPages"=>$totalPages,"page"=>$page,"clients"=>$cos));

?>